<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/common.js"></script>
</head>
<body>
    <p><img src="./img/loginlogo.png" alt=""></p>
    <!-- <div><img src="./img/tbanner1.png" alt=""></div> -->
    <!-- <div><img src="./tbanner1.png" alt=""></div> -->

    <!-- 
        enctype属性：用来设置表单编码格式，如果不设置enctype属性则默认为application/x-www-form-urlencoded
        
                     application/x-www-form-urlencoded表示是以键值对格式发送表单数据
     -->
 <form action="/loginaction" method="post" enctype="application/x-www-form-urlencoded">
    <div>帐号：<input type="text" name="usr" id="usr" placeholder="请输入帐号"></div>
    <div>密码：<input type="password" name="pwd" id="pwd" placeholder="请输入密码"></div>
    <div>验证码：<input type="text" name="ucode" id="pwd" placeholder="请输入验证码"></div>
    <div>
        <img id='imgcode' src="/syscode" alt="">&nbsp;<span id="imgs">看不清</span>
    </div>
    <div><input type="submit" value="登录"></div>
 </form>
 <script>
    let imgsObj = document.getElementById('imgs');
    let imgcodeObj = document.getElementById('imgcode');
    imgsObj.onclick = function(){
       // alert(123);
       imgcodeObj.src='/syscode?'+Math.random();
       console.log('Hello....');
    }
 </script>
</body>
</html>